from PIL import Image
import numpy as np

img = Image.open("zmg.jpeg")
img_array = np.array(img)
arr1 = img_array[:]
print(arr1.shape)
for x in range(1, arr1.shape[0]):
    for y in range(1, arr1.shape[1]):
        a = img_array[x, y][0]
        b = img_array[x, y][1]
        c = img_array[x, y][2]
        arr1[x, y] = (a, a, a)
image_arr = Image.fromarray(arr1)
image_arr.show()
